package com.itheima.二维数组;

import java.util.Scanner;

/*
     键盘录入季节
 */
public class Work02 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int month;
        while (true) {
            System.out.println("请输入月份值:");
            month = sc.nextInt();
            if (month > 12 || month < 1) {
                System.out.println("请重新输入!");
            } else {
                break;
            }
        }
        switch (month) {
            case 3:
            case 4:
            case 5:
                System.out.println("春天");
                break;
            case 6:
            case 7:
            case 8:
                System.out.println("夏天");
                break;
            case 9:
            case 10:
            case 11:
                System.out.println("秋天");
                break;
            case 12:
            case 1:
            case 2:
                System.out.println("冬天");
                break;
        }
    }
}
